package club.yunqiang.gui;

import javax.swing.*;
import java.util.concurrent.TimeUnit;

/**
 * @author 张云强
 * @date 2019/7/14
 */
public class HelloLabel {

    public static void main(String[] args) throws InterruptedException {
        JFrame jFrame = new JFrame();
        jFrame.setVisible(true);
        jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        jFrame.setSize(300, 100);

        // 添加label
        JLabel jLabel = new JLabel("A label");
        jFrame.add(jLabel);
        TimeUnit.SECONDS.sleep(1);
        jLabel.setText("Hey This is Different!");
    }

}
